package com.metagurukul.informer.service;

import junit.framework.TestCase;

import com.metagurukul.informer.service.QuestionsService;
import com.metagurukul.informer.service.ShowQuestionService;

public class ShowQuestionServiceTest extends TestCase{
	
	int question_id;
	@Override
	protected void setUp() throws Exception{
		try {
			QuestionsService questionsService = new QuestionsService();
			question_id = questionsService.insert("Test Question", "Test Question description", "C", "aman.agrawal@metagurukul.com");
		} catch (Exception ex) {
			assertNull(ex);
		}
	}
	
	public void testGetData(){
		try{
			ShowQuestionService service=new ShowQuestionService();
			boolean flag=service.getData(question_id+"", null);
			assertEquals(true,flag);
		} catch (Exception ex) {
			assertNull(ex);
		}
		
	}
}
